import Vue from 'vue'
import App from './App.vue'
import router from './router'
import { registerMicroApps, start } from 'qiankun'

Vue.config.productionTip = false
window.__POWERED_BY_QIANKUN_PARENT__ = true

const apps = [
  {
    name: 'qiankun-main',
    entry: '//localhost:10001',
    container: '#main',
    activeRule: '/main'
  },
  {
    name: 'qiankun-sub',
    entry: '//localhost:10000',
    container: '#sub',
    activeRule: '/main/sub'
  },
]

registerMicroApps(apps)

start({
  sandbox: true,
  prefetch: false
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
